<template>
  <div class="tag" @click="search">
    <span>{{ text }}</span>
    <Icon type="ios-arrow-forward" />
  </div>
</template>

<script>
export default {
  props: {
    text: String
  },
  methods: {
    search() {
      this.$router.push("/list?type=type&key=" + this.text);
    }
  }
};
</script>

<style lang="scss" scoped>
.tag {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  height: 38px;
  justify-content: space-between;
  padding: 2px 4px;
  color: $color;
  margin: 3px 5px;
  cursor: pointer;
  &:hover {
    background: rgba($color: #933, $alpha: 0.1);
  }
}
</style>
